function tst(){
    window.location.href = '/cau-hoi-thuong-gap/chuong-trinh-eb-5.html';
}
//Popup dang ky nhan tih
$(".wd-open-popup").magnificPopup({
        type: 'inline',
        removalDelay: 500, //delay removal by X to allow out-animation
        callbacks: {
            beforeOpen: function() {
                this.st.mainClass = this.st.el.attr('data-effect');
            }
        },
        fixedContentPos: false,
        midClick: true
});
//End
$('.reset-button').click(function(){
        $("input[type='text'],textarea").val('');
});
//newsleters
$('.newsleter-email').submit(function(e){
        var formObj = $(this);
        var formURL = formObj.attr("action");
        var formData = new FormData(this);
        $.ajax({
                url: formURL,
                type: 'POST',
                data:  formData,
                mimeType:"multipart/form-data",
                contentType: false,
                dataType: 'json',
                cache: false,
                processData:false,
                success: function(data, textStatus, jqXHR)
                {
                    alert(data.msg);
                    if(data.code==200) $("input[type='text'],textarea").val('');
                }
        });
        return false;
});
//End

//Valid Email
function validateEmail($email) {
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    if (!emailReg.test($email)) {
        return false;
    } else {
        return true;
    }
}